<?PHP

// 发短信
function Get($url)
{
//	echo $url;
	$ch = curl_init();
	$timeout = 30;
	curl_setopt ($ch, CURLOPT_URL, $url);
	curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true);
	curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
	$file_contents = curl_exec($ch);
	curl_close($ch);
	
//echo $file_contents;
	return $file_contents;
} 

function SendPhone($phone, $msg)
{
	if ($phone == "" || $msg == "")
		return 0;
		
	$url='http://gateway.woxp.cn:6630/utf8/web_api/?x_eid=0&x_uid=collin1211&x_pwd_md5=7f8544725421910024ca66d10ceddcdd&x_ac=10&x_gate_id=300&x_target_no='.$phone.'&x_memo='.urlencode($msg);
//	echo $url;
	Get($url);
	
	return 1;
}

?>